|
2020-2021 Sunseeker Telemetry and Lighting System
|
#include "driverlib.h"Go to the source code of this file.
Macros | |
| #define | Num_of_Results 8 |
Functions | |
| void | main (void) |
| void | ADC12ISR (void) |
Variables | |
| volatile uint16_t | results [Num_of_Results] |
| #define Num_of_Results 8 |
ADC12_A - Sample A0 Input, AVcc Ref, Repeated Single Conversion
This example shows how to perform repeated conversions on a single channel using "repeat-single-channel" mode. AVcc is used for the reference and repeated conversions are performed on Channel A0. Each conversion result is moved to an 8-element array called results[]. Test by applying a voltage to channel A0, then running. Open a watch window in debugger and view the results. Set Breakpoint1 in the index increment line to see the array value change sequentially and Breakpoint to see the entire array of conversion results in "results[]" for the specified Num_of_Results. This can run even in LPM4 mode as ADC has its own clock.
MSP430F552x
-----------------
/|\| |
| | |
--|RST P6.0/A0|<- Vin
| |
This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:
This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.
Definition at line 69 of file adc12_a_ex5_repeatedSingle.c.
| void ADC12ISR | ( | void | ) |
Definition at line 157 of file adc12_a_ex5_repeatedSingle.c.
| void main | ( | void | ) |
Definition at line 77 of file adc12_a_ex5_repeatedSingle.c.
References __no_operation(), and param.
| volatile uint16_t results[Num_of_Results] |
Definition at line 71 of file adc12_a_ex5_repeatedSingle.c.